<style lang="stylus">
  @import '../../common/stylus/mixin'
  i.mintui{
    color: #a1a1a1;
    font-size: 0.5rem !important;
  }
  .header.mint-header{
    background: #FFF;
    height: 1.31944rem;
    max-height: 1.31944rem;
    padding:0;
    color: #333;
    text-align: left;
    font-size: 0.41667rem;
    h1{
      height: 1.31944rem;
      line-height: 1.31944rem;
    }
    .mint-header-button {
      text-align:center;
      flex:0 0 1.15278rem;
      -webkit:0 0 1.15278rem;
    }
    .mint-header-button.is-right {
      margin-right: 0.38889rem;
    }
  }
</style>
<template lang="html">
  <div>
    <mt-header class="header  border-1px-bottom" :title="title">
      <router-link to="" slot="left">
       <mt-button icon="back" class="back" @click="goBackFun"></mt-button>
      </router-link>
        <mt-button slot="right"><slot name="right-content"></slot></mt-button>
    </mt-header>
  </div>
</template>
<script>
export default {
  props: {
    seller: {
      type: Object
    },
    title: {
      type: String
    }
  },
  created() {
  },
  data() {
    return {
      detailShow: false,
      viewMode: '../static/img/list@2x.png'
    }
  },
  methods: {
    // goBackFun() {
    //   this.$router.back(-1);
    // }
    // 处理路由返回界面不准确
    goBackFun() {
      if (this.title === '使用代金券') {
        this.$emit('isUseVouchers', 'false');
      } else {
        this.$emit('isUseVouchers', 'true');
        this.$router.back(-1);
      }
    }
  }
}
</script>

